﻿using KingsSharp.Core.Data.Entity;
using CRM.Admin.Contracts.Model.Logs;
using System;

namespace CRM.Admin.Services.EntityConfigurations.Logs
{
    public class BusinessLogConfiguration : EntityConfigurationBase<BusinessLog, Guid>
    {
        public BusinessLogConfiguration()
        {
            this.Property(a => a.Action).HasMaxLength(20);
            this.Property(a => a.Ip).HasMaxLength(18);
            this.Property(a => a.SystemName).HasMaxLength(50);
            this.Property(a => a.Type).HasMaxLength(200);
            this.Property(a => a.BusinessId).HasMaxLength(40);
            this.Property(a => a.Content).HasMaxLength(500);
            this.Property(a => a.Brower).HasMaxLength(50);
            this.HasRequired(a => a.User).WithMany().HasForeignKey(c => c.UserId);
        }
    }
}
